package com.xrz.service.impl;

import com.xrz.common.Result;
import com.xrz.dao.GroupInfoDao;
import com.xrz.service.GroupService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public class GroupServiceImpl implements GroupService {
    @Resource
    GroupInfoDao groupInfoDao;


    @Override
    public Result exitGroup(Integer userId, Integer groupId) {

        int res =groupInfoDao.deleteByGroupIdAndUserId(groupId,userId);
        if (res==1) {
            Result.success("操作成功！");
        }
        return Result.error(0,"操作失败！");
    }
}
